- content_for(:title) do
  | #{t('.trend')}
.explore
  .row
    .small-12.columns
      = render partial: 'head', locals: { type: 'trend' }
      .row
        .show-for-medium-up.small-0.medium-3.columns
          ul.by-tabs
            li.tab-title class="#{active_for(@cond, :by_investments)}"
              = link_to t('.by_investments'), trend_explore_index_path(cond: :by_investments, how_much: @how_much)
            li.tab-title class="#{active_for(@cond, :by_stars)}"
              = link_to t('.by_stars'), trend_explore_index_path(cond: :by_stars, how_much: @how_much)
            li.tab-title class="#{active_for(@cond, :by_talks)}"
              = link_to t('.by_talks'), trend_explore_index_path(cond: :by_talks, how_much: @how_much)
            li.tab-title class="#{active_for(@cond, :by_times)}"
              = link_to t('.by_times'), trend_explore_index_path(cond: :by_times, how_much: @how_much)
        .small-12.medium-9.columns
          ul.by-tabs-2
            li.tab-title class="#{active_for(@how_much, :most_a_week)}"
              = link_to t('.a_week'), trend_explore_index_path(cond: @cond, how_much: :most_a_week)
            li.tab-title class="#{active_for(@how_much, :most_a_month)}"
              = link_to t('.a_month'), trend_explore_index_path(cond: @cond, how_much: :most_a_month)
          .trend
            - if @cond == :by_investments
              table
                thead
                  tr
                    td.index
                    td.project #{t('.project')}
                    td.commitment #{t('.amount')}
                tbody
                - i = 0
                - @investments_most.each do |money_require_id, count|
                  - i += 1
                  - money_require = MoneyRequire.find(money_require_id)
                  - project = money_require.project
                  tr
                    td #{i}
                    td
                      = render partial: 'project_td', locals: { project: project }
                    td.data ¥ #{number_with_delimiter(money_require.money)}
            - elsif @cond == :by_stars
              table
                thead
                  tr
                    td.index
                    td.project #{t('.project')}
                    td.star #{t('.star')}
                tbody
                - i = 0
                - @stars_most.each do |project_id, count|
                  - project = Project.find(project_id)
                  - i += 1
                  tr
                    td #{i}
                    td
                      = render partial: 'project_td', locals: { project: project }
                    td.data #{count}
            - elsif @cond == :by_talks
              table
                thead
                  tr
                    td.index
                    td.project #{t('.project')}
                    td.star #{t('.talk')}
                tbody
                - i = 0
                - @talks_most.each do |project_id, count|
                  - project = Project.find(project_id)
                  - i += 1
                  tr
                    td #{i}
                    td
                      = render partial: 'project_td', locals: { project: project }
                    td.data #{count}
            - elsif @cond == :by_times
              table
                thead
                  tr
                    td.index
                    td.project #{t('.project')}
                    td.star #{t('.time')}
                tbody
                - i = 0
                - @projects_most.each do |project|
                  - i += 1
                  tr
                    td #{i}
                    td
                      = render partial: 'project_td', locals: { project: project }
                    td.data #{time_ago_in_words(project.created_at)}
